
(global-font-lock-mode 1)

(global-set-key [f1]  'info)
(global-set-key [f2]  'undo)
;(global-set-key [f3] 'redo)
(global-set-key [f3]  '(lambda() (interactive) (switch-to-buffer "*scratch*")))
(global-set-key [f4]  'kill-this-buffer)
(global-set-key [f5]  'goto-line)
(global-set-key [f6]  'speedbar)
(global-set-key [f10] 'menu-bar-mode)
(global-set-key [f11] 'revert-buffer)
(global-set-key [f12] 'compile)
(global-set-key (kbd "<escape> <escape>") 'ibuffer)
(global-set-key (kbd "C-M-,") 'uncomment-region)
(global-set-key (kbd "C-M-.") 'comment-region)
(global-set-key (kbd "C-o") 'david-vi-open-next-line)
(global-set-key (kbd "C-m") 'newline-and-indent)
(global-set-key (kbd "C-j") 'newline)
(global-set-key (kbd "C-q") 'set-mark-command)
(global-set-key (kbd "C-;") 'david-dump-line-down)
(global-set-key (kbd "C-c $") 'toggle-truncate-lines)
(global-set-key (kbd "C-c j") 'ffap)
(global-set-key (kbd "C-c cv") 'view-mode)
(global-set-key "%" 'david-match-paren)
(global-set-key [(meta up)] 'david-move-line-up)
(global-set-key [(meta down)] 'david-move-line-down)
(global-set-key (kbd "C-x C-c") 'delete-frame)

;(setq skeleton-pair t)
;(global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
;(global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
;(global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
;(global-set-key (kbd "<") 'skeleton-pair-insert-maybe)


(setq visible-bell t)
(setq inhibit-startup-message t)
(setq column-number-mode t)
(setq mouse-yank-at-point t)
(setq default-fill-column 80)
(setq default-major-mode 'text-mode)
(setq show-paren-style 'parentheses)
(setq-default indent-tabs-mode nil)
(setq default-tab-width 4)
(setq frame-title-format "%b - %f")
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
(setq ring-bell-function 'ignore)
(setq default-directory "~")
(setq backup-directory-alist '(("" . "~/.emacs.d/backup")))
;(setq backup-directory-alist '(("" . ,(concat home-emacs-d "backup"))))
(setq mail-signature t)
;(setq mail-user-agent 'gnus-user-agent)
(setq mail-user-agent 'sendmail-user-agent)
(setq compilation-window-height 8)
;(setq-default cursor-type 'box)
(blink-cursor-mode nil)

(mouse-wheel-mode t)
(show-paren-mode t)
(mouse-avoidance-mode 'animate)
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(icomplete-mode t)
(delete-selection-mode t)
(fset 'yes-or-no-p 'y-or-n-p)
(add-to-list 'load-path (concat home-emacs-d "site-lisp/"))

(require 'midnight)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; EMACS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;(setq custom-file (concat home-emacs-d "config/custom.el"))
(setq custom-file (concat "~" (user-login-name) "/.emacs.d/config/custom.el"))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(blink-cursor-mode nil)
 '(column-number-mode t)
 '(fringe-mode 0 nil (fringe))
 '(menu-bar-mode t)
 '(midnight-delay 43200)
 '(show-paren-mode t)
 '(transient-mark-mode t))
